package com.aaa.three.controller;

import com.aaa.three.entity.AddReg;
import com.aaa.three.pojo.query.DoctorQuery;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.PatientRegistrationService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PACKAGE_NAME: com.aaa.three.controller
 * @NAME: PatientRegistrationController
 * @USER: Tprairie
 * @DATE: 2022/2/18
 * @PROJECT_NAME: three
 */
@RestController
@RequestMapping("/reg")
public class PatientRegistrationController {
    @Autowired
    private PatientRegistrationService patientRegistrationServiceImpl;
    @RequestMapping("/listAll")
    public AjaxResult listAll(DoctorQuery doctorQuery){
        return patientRegistrationServiceImpl.listAll(doctorQuery);
    }
    @RequestMapping("/get")
    public AjaxResult getSchedule(AddReg addReg){
        return patientRegistrationServiceImpl.getSchedule(addReg);
    }
    @RequestMapping("/getInfo")
    public AjaxResult getinformation(){
        return patientRegistrationServiceImpl.getinformation();
    }
    @RequestMapping("/ver")
    public AjaxResult verifyQuery(AddReg addReg){
        return patientRegistrationServiceImpl.verifyQuery(addReg);
    }
    @RequestMapping("/addplay")
    public AjaxResult addRegistration(AddReg addReg){
        return patientRegistrationServiceImpl.addRegistration(addReg);
    }
    @RequestMapping("/getAdminInfo/{id}")
    public AjaxResult getAdminInfo(@PathVariable("id")Integer id){
        return patientRegistrationServiceImpl.getAdminInfo(id);
    }
    @RequestMapping("/success")
    public String success(){
        return "交易成功";
    }
    @RequestMapping(value="/index")
    public String payCoin(){
        return "zfindex.html";
    }
}
